
<template>
  <div>
    <hr>
    <h1>兄弟2</h1>
    <button @click="send">发送信号</button>
  </div>
</template>
<script>
import $bus from '../utils/bus'
import { defineComponent, ref } from 'vue'
export default defineComponent({
  setup() {
    let msg = ref("有内鬼，停止交易");
    let send = () => {
      // 兄弟传参
      $bus.emit("sendmsg", msg.value)
    }
    return {
      send
    }
  }
})
</script>
<style lang="less">
</style>